{% extends 'HuiFrontEndBundle::layout.html.twig' %}

{% block head %}
 <script type="text/javascript">
     $(function () {

         $('#TrangChu').removeClass("active");
         $('#MayAnh').removeClass("active");
         $('#MayQuay').removeClass("active");
         $('#PhuKien').removeClass("active");
         $('#KhuyenMai').removeClass("active");
         $('#SoSanh').removeClass("active");
         $('#LienHe').addClass("active");


         $("#lienhe").click(function () {
             if ($('#tieude').val() == "") {
                 alert('Vui lòng nhập tiêu đề !');
                 $('#tieude').focus();
                 return;
             }
             if ($('#email').val() == "") {
                 alert('Vui lòng nhập email !');
                 $('#email').focus();
                 return;
             }
             if ($('#noidung').val() == "") {
                 alert('Vui lòng nhập nội dung !');
                 $('#noidung').focus();
                 return;
             }

             var parameter = $('#email').val() + ";" + $('#tieude').val() + ";" + $('#noidung').val();
             $.ajax({
                 type: 'POST',
                 url: "WebService/LienHe.asmx/LienLac",
                 data: "{'parameter':'" + parameter + "'}",
                 contentType: 'application/json; charset=Shift_JIS',
                 dataType: "json",
                 success: function (data) {

                     if (data.d == 'true') {


                         alert("Gửi thành công");

                     }
                     else {




                     }

                 }
             });

         });
     });
	function onAfter(curr, next, opts, fwd){var $ht=$(this).height();$(this).parent().animate({height:$ht})}
</script>
{% endblock %}

{% block content %}

<div class="wrapper">
                	<article class="grid_24">
                    	<div class="page8-box1">
                        	<article class="grid_9 alpha">
                                <h3 class="p36">Thông tin liên hệ</h3>
                                <p>201 Dương Bá Trạc, P.1, Q.8</p>
                                <span class="text28">E-mail: <a href="http://static.livedemo00.template-help.com/wt_39617/more.html">mr.anrew@gmail.com</a></span>
                                <span class="text29">Điện thoại: <span>38 211 211 </span></span>
                                <h3>Find  us  on Social Sites:</h3>
                                <ul class="soc-links">
                                    <li><a class="soc-link1" href="http://static.livedemo00.template-help.com/wt_39617/index-6.html#"></a></li>
                                    <li><a class="soc-link2" href="http://static.livedemo00.template-help.com/wt_39617/index-6.html#"></a></li>
                                    <li><a class="soc-link3" href="http://static.livedemo00.template-help.com/wt_39617/index-6.html#"></a></li>
                                    <li><a class="soc-link4" href="http://static.livedemo00.template-help.com/wt_39617/index-6.html#"></a></li>
                                    <li><a class="soc-link5" href="http://static.livedemo00.template-help.com/wt_39617/index-6.html#"></a></li>
                                    <li><a class="soc-link6" href="http://static.livedemo00.template-help.com/wt_39617/index-6.html#"></a></li>
                                    <li><a class="soc-link7" href="http://static.livedemo00.template-help.com/wt_39617/index-6.html#"></a></li>
                                </ul>
                            </article>
                            <article class="grid_14">
                            	<div class="page8-box2">
                                <h3>Gửi lời nhắn cho chúng tôi</h3>
                                <div id="form1">
                        <div class="success" style="display: none; ">Contact form submitted!<strong> We will be in touch soon.</strong></div>
                          <fieldset>
                          <span class="text30">Tiêu đề:</span>
                              <label class="name">
                                    <input type="text" id="tieude">
                                    <span class="error" style="display: none; ">*This is not a valid name.</span> <span class="empty" style="display: none; ">*This field is required.</span> 
                                </label> 
                                <div class="clear"></div>
                                <span class="text30">E-mail:</span>                                       
                                <label class="email">
                                    <input type="text" id="email">
                                    <span class="error" style="display: none; ">*This is not a valid email address.</span> <span class="empty" style="display: none; ">*This field is required.</span> 
                                </label> 
                                <div class="clear"></div>
                                <span class="text30">Nội dung:</span>                                                                
                               <label class="message">
                              <textarea id="noidung"></textarea>
                              <span class="error" style="display: none; ">*The message is too short.</span> <span class="empty" style="display: none; ">*This field is required.</span> </label>
                              <div class="clear"></div>
                              <div class="link-form">         
                                                   
                              <a class="link9" id="lienhe">Gửi</a>                              
                              </div>											
                          </fieldset>           
                      </div>
                      </div>
                            </article>
                        </div>
                    </article>
                </div>

{% endblock %}
